Skip to main content

Attach Window

AutomatR.Windows.Activities.AttachWindow

The "Attach Window" activity in AutomatR for Windows UI Automation enables you to attach to an existing application window, allowing you to perform various actions on that window. This activity is particularly useful when interacting with specific applications during automation workflows.

Properties

NameDescription
Input
SelectorIndicates the application window to attach using the Window Selector. Use the browse button to select the window with the help of the Window Selector window. A string variable containing the window selector.
WindowSpecifies the window variable for the application that needs to be attached for further activities. An InArgument of type SelectorWindow.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelayDelay (in seconds) between the time this activity is completed and the time the next activity begins any operations. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e. 1.
Output
ResultOutputs the SelectorWindow for the attached application window. The SelectorWindow can be used in subsequent activities for interacting with the attached window. An OutArgument of type SelectorWindow.

How to use:

  1. Drag and drop the "Attach Window" activity onto the workflow.
  2. Configure the properties by selecting the application window using the Window Selector or providing a window variable.
  3. Optionally, customize the display name.
  4. Execute the workflow to attach to the specified application window.

Example: Consider an example where the "Attach Window" activity is used to attach to the Notepad application window:

Attach Window:
Display Name: "Attach to Notepad"
Selector: "[Title='Untitled - Notepad']"
Window: notepadWindow
Result: attachedWindow

In this example, the activity attaches to the Notepad application window with the title "Untitled - Notepad." The SelectorWindow for the attached window is stored in the variable "attachedWindow" for further use in the workflow.